﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucTemplate.ascx.cs" Inherits="WCrawler.Controls.ucTemplate" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>
    
    <div>
     <asp:TreeView ID="treeViewTemplate" runat="server" 
                    ontreenodepopulate="treeView_TreeNodePopulate" 
                    onselectednodechanged="treeView_SelectedNodeChanged"
                    ShowLines="True" ImageSet="XPFileExplorer" NodeIndent="15" Width="100%" 
                    style="margin-bottom: 0px">
                    <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
                <Nodes>
                    <asp:TreeNode Text="Templates" PopulateOnDemand="true" Value="0"/>
                </Nodes>
                    <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" 
                        HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
                    <ParentNodeStyle Font-Bold="False" />
                    <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" 
                        HorizontalPadding="0px" VerticalPadding="0px" />
                </asp:TreeView>
    </div>
    <div>
        <asp:Button ID="btnAdd" runat="server" onclick="btnAdd_Click" Text="Add" />
        <asp:Button ID="btnUpdate" runat="server" Text="Update" />
        <asp:Button ID="btnDelete" runat="server" Text="Delete" />
        </div>
        <asp:LinqDataSource ID="TemplateLinqDataSource" runat="server" 
            ContextTypeName="WCrawlerLib.LinqDataClassesDataContext" EntityTypeName="" 
            TableName="Templates" EnableDelete="True" EnableUpdate="True">
        </asp:LinqDataSource>

    
<div>
    <!-- Popup show full content-->
        <asp:Button ID="btnShowPopup" runat="server" style="display:none" />
        <ajaxToolkit:ModalPopupExtender id="mdlPopup" runat="server" 
            backgroundcssclass="BackgroundStyle" popupcontrolid="PanelDetailsTemplate" 
            targetcontrolid="btnShowPopup">
        </ajaxToolkit:ModalPopupExtender>
        <asp:Panel ID="PanelDetailsTemplate" runat="server" BackColor="#ffffff" 
            BorderColor="#dadada" BorderStyle="Solid" BorderWidth="4px" Font-Names="Arial" 
            Font-Size="10pt" Width="800px">
            <table cellpadding="10" cellspacing="0" style="width: 100%">
                <tr>
                    <td>
                        <asp:Label ID="Label7" runat="server" Text="Template"></asp:Label>
                        <asp:TextBox ID="txtTemplate" runat="server"></asp:TextBox>
                        <asp:Button ID="btnAddTemplate" runat="server" onclick="btnAddTemplate_Click" 
                            Text="Add Template" />
                    </td>
                </tr>
                <tr>
                    <td align="center" valign="middle">
                        <asp:Button ID="btnAddNew" runat="server" onclick="btnAddNew_Click" 
                            Text="Add" />
                        <asp:Button ID="btnCancel" runat="server" Text="Cancel" />
                        <br />
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </div>